import request from '@/utils/request'

// 查询系统表单缓存列表
export function listSysFormCache(query) {
  return request({
    url: '/formCache/sysFormCache/list',
    method: 'get',
    params: query
  })
}

// 查询系统表单缓存详细
export function getSysFormCache(id) {
  return request({
    url: '/formCache/sysFormCache/' + id,
    method: 'get'
  })
}

export function getSysFormCacheByKey(key, type) {
  return request({
    url: '/formCache/sysFormCache/getByKey/' + key + '/' + type,
    method: 'get'
  })
}

// 保存系统表单缓存
export function saveSysFormCache(data) {
  return request({
    url: '/formCache/sysFormCache/save',
    method: 'post',
    data: data
  })
}

// 删除系统表单缓存
export function delSysFormCache(id) {
  return request({
    url: '/formCache/sysFormCache/' + id,
    method: 'delete'
  })
}
